/*      */ package dm.jdbc.rowset;
/*      */ 
/*      */ import dm.jdbc.dataConvertion.CType2JType;
/*      */ import dm.jdbc.dataConvertion.Convertion;
/*      */ import dm.jdbc.dataConvertion.ReaderToInputStream;
/*      */ import dm.jdbc.dbaccess.Const;
/*      */ import dm.jdbc.dbaccess.DBError;
/*      */ import dm.jdbc.driver.DmdbConnection_bs;
/*      */ import dm.jdbc.driver.DmdbResultSetMetaData_bs;
/*      */ import dm.jdbc.driver.DmdbResultSet_bs;
/*      */ import dm.sql.DmdbDateTime;
/*      */ import dm.sql.DmdbIntervalDT;
/*      */ import dm.sql.DmdbIntervalYM;
/*      */ import dm.sql.DmdbTime;
/*      */ import dm.sql.STRUCT;
/*      */ import java.io.BufferedReader;
/*      */ import java.io.ByteArrayInputStream;
/*      */ import java.io.InputStream;
/*      */ import java.io.InputStreamReader;
/*      */ import java.io.Reader;
/*      */ import java.io.StringBufferInputStream;
/*      */ import java.io.StringReader;
/*      */ import java.math.BigDecimal;
/*      */ import java.net.URL;
/*      */ import java.sql.Array;
/*      */ import java.sql.Blob;
/*      */ import java.sql.Clob;
/*      */ import java.sql.Date;
/*      */ import java.sql.Ref;
/*      */ import java.sql.SQLException;
/*      */ import java.sql.SQLWarning;
/*      */ import java.sql.Savepoint;
/*      */ import java.sql.Time;
/*      */ import java.sql.Timestamp;
/*      */ import java.util.Calendar;
/*      */ import java.util.Collection;
/*      */ import java.util.Collections;
/*      */ import java.util.Map;
/*      */ import java.util.ResourceBundle;
/*      */ import java.util.TreeMap;
/*      */ import java.util.Vector;
/*      */ import javax.sql.RowSetListener;
/*      */ import javax.sql.RowSetReader;
/*      */ import javax.sql.RowSetWriter;
/*      */ import javax.sql.rowset.RowSetWarning;
/*      */ import javax.sql.rowset.serial.SerialBlob;
/*      */ import javax.sql.rowset.serial.SerialClob;
/*      */ import javax.sql.rowset.spi.SyncFactory;
/*      */ import javax.sql.rowset.spi.SyncFactoryException;
/*      */ import javax.sql.rowset.spi.SyncProvider;
/*      */ import javax.sql.rowset.spi.SyncProviderException;
/*      */ 
/*      */ 
/*      */ public abstract class DmdbCachedRowSet_bs
/*      */   extends DmdbRowSetInner
/*      */ {
/*   57 */   private static transient DmdbConnection_bs m_conn_bs = null;
/*   58 */   protected DmdbResultSet_bs m_resultSet_bs = null;
/*      */   
/*   60 */   protected String m_serverEncoding = null;
/*      */   
/*   62 */   protected int m_currentRow = 0;
/*      */   
/*      */   protected boolean m_previousColNull;
/*      */   
/*   66 */   protected int m_currentPage = 1;
/*   67 */   protected int m_pageCount = 0;
/*   68 */   private int m_pageSize = 0;
/*   69 */   private boolean m_populatedDone = false;
/*      */   
/*   71 */   protected int m_columnCount = 0;
/*   72 */   protected int m_rowCount = 0;
/*   73 */   protected Vector<DmdbRow> m_rows = null;
/*   74 */   private DmdbRow m_insertRow = null;
/*   75 */   private int m_insertRowPos = 0;
/*   76 */   private int m_updateRowPos = 0;
/*      */   
/*   78 */   private boolean m_insertFlag = false;
/*   79 */   private boolean m_updateFlag = false;
/*      */   
/*   81 */   private Vector<DmdbParameter> m_params = null;
/*      */   
/*   83 */   private SQLWarning m_sqlWarning = null;
/*      */   private RowSetWarning m_rowsetWarning;
/*   85 */   protected DmdbResultSetMetaData_bs m_rsmd = null;
/*   86 */   private String[] m_columnNames = null;
/*   87 */   private String m_tableName = null;
/*      */   
/*      */   private int[] m_keyColumns;
/*      */   
/*      */   private DmdbCachedRowSetReaderInner m_reader;
/*      */   private DmdbCachedRowSetWriterInner m_writer;
/*      */   private static final String DEFAULT_SYNCPROVIDER = "com.sun.rowset.providers.RIOptimisticProvider";
/*   94 */   private SyncProvider m_syncProvider = null;
/*      */   
/*   96 */   protected boolean m_closed = false;
/*      */   
/*      */ 
/*   99 */   private boolean m_KeepConnecting = false;
/*      */   
/*      */   DmdbCachedRowSet_bs() throws SQLException {
/*  102 */     initialize();
/*      */   }
/*      */   
/*      */   private void initialize() throws SQLException {
/*  106 */     this.m_currentRow = 0;
/*  107 */     this.m_columnCount = 0;
/*  108 */     this.m_previousColNull = false;
/*      */     
/*  110 */     this.m_currentPage = 1;
/*  111 */     this.m_pageSize = 0;
/*  112 */     this.m_resultSet_bs = null;
/*  113 */     this.m_populatedDone = false;
/*      */     
/*  115 */     this.m_rowCount = 0;
/*  116 */     if (this.m_rows == null) {
/*  117 */       this.m_rows = new Vector(50);
/*      */     } else
/*  119 */       this.m_rows.clear();
/*  120 */     this.m_showDeleted = false;
/*  121 */     this.m_insertRow = null;
/*      */     
/*  123 */     this.m_insertRowPos = 0;
/*      */     
/*  125 */     this.m_insertFlag = false;
/*  126 */     this.m_updateFlag = false;
/*      */     
/*  128 */     this.m_params = new Vector(10);
/*      */     
/*  130 */     this.m_sqlWarning = new SQLWarning();
/*  131 */     this.m_rowsetWarning = new RowSetWarning();
/*      */     
/*  133 */     this.m_rsmd = null;
/*  134 */     this.m_columnNames = null;
/*  135 */     this.m_tableName = null;
/*  136 */     this.m_keyColumns = new int[0];
/*      */     
/*  138 */     this.m_reader = new DmdbCachedRowSetReaderInner();
/*  139 */     this.m_writer = new DmdbCachedRowSetWriterInner();
/*      */     
/*  141 */     this.m_closed = false;
/*      */     
/*  143 */     this.m_KeepConnecting = false;
/*      */     try
/*      */     {
/*  146 */       this.m_syncProvider = SyncFactory.getInstance("com.sun.rowset.providers.RIOptimisticProvider");
/*      */     } catch (SyncFactoryException syncfactoryexception) {
/*  148 */       throw new SQLException("SyncProvider instance not constructed.");
/*      */     }
/*      */   }
/*      */   
/*      */   private void uninitialize() {
/*  153 */     this.m_currentRow = 0;
/*  154 */     this.m_columnCount = 0;
/*      */     
/*  156 */     this.m_currentPage = 1;
/*      */     
/*  158 */     this.m_resultSet_bs = null;
/*  159 */     this.m_populatedDone = false;
/*      */     
/*  161 */     this.m_rowCount = 0;
/*  162 */     this.m_rows = null;
/*  163 */     this.m_showDeleted = false;
/*  164 */     this.m_insertRow = null;
/*      */     
/*  166 */     this.m_insertRowPos = 0;
/*      */     
/*  168 */     this.m_insertFlag = false;
/*  169 */     this.m_updateFlag = false;
/*      */   }
/*      */   
/*      */   protected DmdbRow getCurrentRow() throws SQLException
/*      */   {
/*  174 */     if ((this.m_currentRow < 1) || (this.m_currentRow > this.m_rowCount)) {
/*  175 */       throw new SQLException(
/*  176 */         Const.res.getString("error.cursorNotInResultSet"));
/*      */     }
/*  178 */     return (DmdbRow)this.m_rows.elementAt(this.m_currentRow - 1);
/*      */   }
/*      */   
/*      */   protected synchronized Object getObjectInner(int col) throws SQLException
/*      */   {
/*  183 */     checkColumn(col);
/*      */     
/*  185 */     DmdbRow row = getCurrentRow();
/*  186 */     Object obj = null;
/*  187 */     if (row.isColumnChanged(col - 1)) {
/*  188 */       obj = row.getChangedColumn(col - 1);
/*      */     } else {
/*  190 */       obj = row.getColumn(col - 1);
/*      */     }
/*  192 */     this.m_previousColNull = (obj == null);
/*      */     
/*  194 */     if ((!this.m_previousColNull) && 
/*  195 */       ((obj instanceof STRUCT))) {
/*  196 */       STRUCT struct = (STRUCT)obj;
/*  197 */       obj = CType2JType.getStruct_SQLData(getTypeMap(), struct, 
/*  198 */         struct.getSQLTypeName());
/*      */     }
/*      */     
/*      */ 
/*  202 */     return obj;
/*      */   }
/*      */   
/*      */   protected synchronized Object getObjectInner(int col, Map<String, Class<?>> map) throws SQLException
/*      */   {
/*  207 */     checkColumn(col);
/*      */     
/*  209 */     DmdbRow row = getCurrentRow();
/*  210 */     Object obj = null;
/*  211 */     if (row.isColumnChanged(col - 1)) {
/*  212 */       obj = row.getChangedColumn(col - 1);
/*      */     } else {
/*  214 */       obj = row.getColumn(col - 1);
/*      */     }
/*  216 */     this.m_previousColNull = (obj == null);
/*      */     
/*  218 */     if ((!this.m_previousColNull) && 
/*  219 */       ((obj instanceof STRUCT))) {
/*  220 */       STRUCT struct = (STRUCT)obj;
/*  221 */       obj = CType2JType.getStruct_SQLData(map, struct, 
/*  222 */         struct.getSQLTypeName());
/*      */     }
/*      */     
/*      */ 
/*  226 */     return obj;
/*      */   }
/*      */   
/*      */   protected synchronized InputStream getStreamInner(int col) throws SQLException
/*      */   {
/*  231 */     Object obj = getObjectInner(col);
/*  232 */     if (obj == null) {
/*  233 */       return null;
/*      */     }
/*  235 */     if ((obj instanceof InputStream)) {
/*  236 */       return (InputStream)obj;
/*      */     }
/*  238 */     if ((obj instanceof byte[])) {
/*  239 */       return new ByteArrayInputStream((byte[])obj);
/*      */     }
/*  241 */     if ((obj instanceof Byte)) {
/*  242 */       byte[] bs = new byte[0];
/*  243 */       bs[0] = ((Byte)obj).byteValue();
/*  244 */       return new ByteArrayInputStream(bs);
/*      */     }
/*      */     
/*  247 */     if ((obj instanceof String)) {
/*  248 */       return new ByteArrayInputStream(Convertion.getBytes((String)obj, 
/*  249 */         this.m_serverEncoding));
/*      */     }
/*  251 */     if ((obj instanceof Blob)) {
/*  252 */       return ((SerialBlob)obj).getBinaryStream();
/*      */     }
/*  254 */     if ((obj instanceof Clob)) {
/*  255 */       return ((SerialClob)obj).getAsciiStream();
/*      */     }
/*  257 */     if ((obj instanceof Reader)) {
/*  258 */       BufferedReader breader = new BufferedReader((Reader)obj);
/*  259 */       ReaderToInputStream chgTemp = new ReaderToInputStream();
/*  260 */       InputStream in = chgTemp.ReaderTo(breader, this.m_serverEncoding);
/*  261 */       return in;
/*      */     }
/*      */     
/*  264 */     throw new SQLException(Const.res.getString("error.dataConvertionError"));
/*      */   }
/*      */   
/*      */   protected synchronized void updateObjectInner(int i, Object obj) throws SQLException
/*      */   {
/*  269 */     checkColumn(i);
/*      */     
/*  271 */     if (this.m_insertFlag) {
/*  272 */       this.m_insertRow.updateColumnValue(i - 1, obj);
/*  273 */       return;
/*      */     }
/*      */     
/*  276 */     if ((isBeforeFirst()) || (isAfterLast())) {
/*  277 */       throw new SQLException(
/*  278 */         Const.res.getString("error.cursorNotInResultSet"));
/*      */     }
/*  280 */     this.m_updateFlag = true;
/*  281 */     this.m_updateRowPos = this.m_currentRow;
/*  282 */     getCurrentRow().updateColumnValue(i - 1, obj);
/*      */   }
/*      */   
/*      */   protected synchronized Number getNumber(int i)
/*      */     throws SQLException
/*      */   {
/*  288 */     Object obj = getObjectInner(i);
/*  289 */     if (obj == null) {
/*  290 */       return null;
/*      */     }
/*  292 */     if ((obj instanceof Number)) {
/*  293 */       return (Number)obj;
/*      */     }
/*  295 */     if ((obj instanceof Boolean)) {
/*  296 */       return new Integer(((Boolean)obj).booleanValue() ? 1 : 0);
/*      */     }
/*  298 */     if ((obj instanceof String)) {
/*  299 */       return new BigDecimal((String)obj);
/*      */     }
/*  301 */     throw new SQLException(Const.res.getString("error.dataConvertionError"));
/*      */   }
/*      */   
/*      */   private boolean setOriginalRowInner(int rowIndex)
/*      */   {
/*  306 */     DmdbRow row = (DmdbRow)this.m_rows.get(rowIndex);
/*      */     
/*  308 */     if (row.isRowDeleted()) {
/*  309 */       this.m_rows.removeElementAt(rowIndex);
/*  310 */       this.m_rowCount -= 1;
/*      */       
/*  312 */       return true;
/*      */     }
/*      */     
/*  315 */     if (row.isRowInserted()) {
/*  316 */       row.setRowInserted(false);
/*  317 */     } else if (row.isRowUpdated()) {
/*  318 */       row.setUpdatesOriginal();
/*      */     }
/*  320 */     return false;
/*      */   }
/*      */   
/*      */   protected void setOriginal() {
/*  324 */     for (int i = 0; i < this.m_rowCount; i++) {
/*  325 */       if (setOriginalRowInner(i))
/*  326 */         i--;
/*      */     }
/*      */   }
/*      */   
/*      */   protected synchronized void notifyCursorMoved() throws SQLException {
/*  331 */     if (this.m_insertFlag) {
/*  332 */       this.m_insertFlag = false;
/*  333 */       this.m_insertRow.setRowUpdated(false);
/*  334 */       DBError.addSQLWarning(this.m_sqlWarning, 
/*  335 */         20020);
/*  336 */     } else if (this.m_updateFlag) {
/*  337 */       this.m_updateFlag = false;
/*  338 */       int i = this.m_currentRow;
/*  339 */       this.m_currentRow = this.m_updateRowPos;
/*  340 */       getCurrentRow().setRowUpdated(false);
/*  341 */       this.m_currentRow = i;
/*  342 */       DBError.addSQLWarning(this.m_sqlWarning, 
/*  343 */         20020);
/*      */     }
/*      */   }
/*      */   
/*      */   protected void checkCurrentRow() throws SQLException {
/*  348 */     if (this.m_insertFlag) {
/*  349 */       throw new SQLException(
/*  350 */         Const.res.getString("error.resultsetInInsertStatus"));
/*      */     }
/*  352 */     if ((isBeforeFirst()) || (isAfterLast())) {
/*  353 */       throw new SQLException(
/*  354 */         Const.res.getString("error.cursorNotInResultSet"));
/*      */     }
/*      */   }
/*      */   
/*      */   protected void checkColumn(int idx) throws SQLException {
/*  359 */     if ((idx < 1) || (idx > this.m_columnCount))
/*  360 */       DBError.throwSQLException(6032);
/*      */   }
/*      */   
/*      */   private void checkRowSet() throws SQLException {
/*  364 */     if ((this.m_rows == null) || (this.m_rows.size() == 0))
/*  365 */       throw new SQLException(
/*  366 */         Const.res.getString("error.cachedRowSetNull"));
/*      */   }
/*      */   
/*      */   private void putParamToVector(Object col, DmdbParameter param) {
/*  370 */     boolean exist = false;
/*      */     
/*  372 */     int len = this.m_params.size();
/*      */     
/*  374 */     String pName = null;
/*  375 */     int pIndex = -1;
/*  376 */     for (int i = 0; i < len; i++) {
/*  377 */       DmdbParameter parameter = (DmdbParameter)this.m_params.elementAt(i);
/*  378 */       pName = parameter.getParamName();
/*  379 */       pIndex = parameter.getParamIndex();
/*      */       
/*  381 */       if (((pName != null) && (pName.equalsIgnoreCase((String)col))) || (
/*  382 */         (pName == null) && (pIndex == ((Integer)col).intValue()))) {
/*  383 */         this.m_params.set(i, param);
/*  384 */         exist = true;
/*      */         
/*  386 */         break;
/*      */       }
/*      */     }
/*      */     
/*  390 */     if (!exist)
/*  391 */       this.m_params.add(param);
/*      */   }
/*      */   
/*      */   protected void setObjectInner(Object col, Object obj) throws SQLException {
/*  395 */     Object[] params = new Object[1];
/*  396 */     params[0] = obj;
/*      */     
/*  398 */     putParamToVector(col, new DmdbParameter(col, params));
/*      */   }
/*      */   
/*      */   protected void setObjectInner(Object col, Object obj, int i, boolean bySetObject) throws SQLException
/*      */   {
/*  403 */     Object[] params = new Object[2];
/*  404 */     params[0] = obj;
/*  405 */     params[1] = Integer.valueOf(i);
/*      */     
/*  407 */     DmdbParameter param = new DmdbParameter(col, params);
/*  408 */     param.setBySetObject(bySetObject);
/*      */     
/*  410 */     putParamToVector(col, param);
/*      */   }
/*      */   
/*      */   protected void setObjectInner(Object col, Object obj, long l) throws SQLException
/*      */   {
/*  415 */     Object[] params = new Object[2];
/*  416 */     params[0] = obj;
/*  417 */     params[1] = Long.valueOf(l);
/*  418 */     DmdbParameter param = new DmdbParameter(col, params);
/*      */     
/*  420 */     putParamToVector(col, param);
/*      */   }
/*      */   
/*      */   protected void setObjectInner(Object col, Object obj, Calendar cal) throws SQLException
/*      */   {
/*  425 */     Object[] params = new Object[2];
/*  426 */     params[0] = obj;
/*  427 */     params[1] = cal;
/*      */     
/*  429 */     putParamToVector(col, new DmdbParameter(col, params));
/*      */   }
/*      */   
/*      */   protected void setObjectInner(Object col, Object obj, int i, String str) throws SQLException
/*      */   {
/*  434 */     Object[] params = new Object[3];
/*  435 */     params[0] = obj;
/*  436 */     params[1] = Integer.valueOf(i);
/*  437 */     params[2] = str;
/*      */     
/*  439 */     DmdbParameter param = new DmdbParameter(col, params);
/*  440 */     param.setBySetObject(true);
/*  441 */     putParamToVector(col, param);
/*      */   }
/*      */   
/*      */   protected void setObjectInner(Object col, Object obj, int i, int j) throws SQLException
/*      */   {
/*  446 */     Object[] params = new Object[3];
/*  447 */     params[0] = obj;
/*  448 */     params[1] = Integer.valueOf(i);
/*  449 */     params[2] = Integer.valueOf(j);
/*      */     
/*  451 */     DmdbParameter param = new DmdbParameter(col, params);
/*  452 */     param.setBySetObject(true);
/*  453 */     putParamToVector(col, param);
/*      */   }
/*      */   
/*      */   Vector<DmdbParameter> getParamsInner() throws SQLException {
/*  457 */     return this.m_params;
/*      */   }
/*      */   
/*      */   boolean keepConnecting() {
/*  461 */     return this.m_KeepConnecting;
/*      */   }
/*      */   
/*      */   public boolean next() throws SQLException {
/*  465 */     if (this.m_rowCount <= 0) {
/*  466 */       return false;
/*      */     }
/*  468 */     int fetchDirection = getFetchDirection();
/*      */     
/*      */ 
/*  471 */     if ((fetchDirection == 1000) || 
/*  472 */       (fetchDirection == 1002)) {
/*  473 */       if (this.m_currentRow < this.m_rowCount)
/*      */       {
/*  475 */         this.m_currentRow += 1;
/*  476 */         DmdbRow row = getCurrentRow();
/*  477 */         if ((!this.m_showDeleted) && (row.isRowDeleted())) {
/*  478 */           return next();
/*      */         }
/*  480 */         notifyCursorMoved();
/*  481 */         return true;
/*      */       }
/*      */       
/*      */ 
/*  485 */       this.m_currentRow = (this.m_rowCount + 1);
/*  486 */       return false;
/*      */     }
/*      */     
/*      */ 
/*      */ 
/*  491 */     if (fetchDirection == 1001)
/*      */     {
/*  493 */       if (this.m_currentRow > 1) {
/*  494 */         this.m_currentRow -= 1;
/*  495 */         DmdbRow row = getCurrentRow();
/*  496 */         if ((!this.m_showDeleted) && (row.isRowDeleted())) {
/*  497 */           return next();
/*      */         }
/*  499 */         notifyCursorMoved();
/*  500 */         return true;
/*      */       }
/*      */       
/*  503 */       this.m_currentRow = 0;
/*  504 */       return false;
/*      */     }
/*      */     
/*      */ 
/*  508 */     return false;
/*      */   }
/*      */   
/*      */   public void beforeFirst() throws SQLException {
/*  512 */     this.m_currentRow = 0;
/*      */   }
/*      */   
/*      */   public boolean isBeforeFirst() throws SQLException {
/*  516 */     return (this.m_rowCount > 0) && (this.m_currentRow == 0);
/*      */   }
/*      */   
/*      */   public boolean isAfterLast() throws SQLException {
/*  520 */     return (this.m_rowCount > 0) && (this.m_currentRow == this.m_rowCount + 1);
/*      */   }
/*      */   
/*      */   public boolean isFirst() throws SQLException {
/*  524 */     return (this.m_rowCount > 0) && (this.m_currentRow == 1);
/*      */   }
/*      */   
/*      */   public boolean isLast() throws SQLException {
/*  528 */     return (this.m_rowCount > 0) && (this.m_currentRow == this.m_rowCount);
/*      */   }
/*      */   
/*      */   public void afterLast() throws SQLException {
/*  532 */     this.m_currentRow = (this.m_rowCount + 1);
/*      */   }
/*      */   
/*      */   public boolean first() throws SQLException {
/*  536 */     return absolute(1);
/*      */   }
/*      */   
/*      */   public boolean last() throws SQLException {
/*  540 */     return absolute(-1);
/*      */   }
/*      */   
/*      */   public boolean absolute(int row) throws SQLException {
/*  544 */     if (getType() == 1003) {
/*  545 */       DBError.throwSQLException(6019);
/*      */     }
/*  547 */     if ((row == 0) || (this.m_rowCount == 0)) {
/*  548 */       return false;
/*      */     }
/*  550 */     if (this.m_currentRow == row) {
/*  551 */       return true;
/*      */     }
/*  553 */     if ((row > 0) && (Math.abs(row) > this.m_rowCount)) {
/*  554 */       this.m_currentRow = (this.m_rowCount + 1);
/*  555 */       notifyCursorMoved();
/*  556 */       return false;
/*      */     }
/*      */     
/*  559 */     if ((row < 0) && (Math.abs(row) > this.m_rowCount)) {
/*  560 */       this.m_currentRow = 0;
/*  561 */       notifyCursorMoved();
/*  562 */       return false;
/*      */     }
/*      */     
/*  565 */     this.m_currentRow = (row > 0 ? row : this.m_rowCount + row + 1);
/*  566 */     notifyCursorMoved();
/*  567 */     return true;
/*      */   }
/*      */   
/*      */   public boolean relative(int rows) throws SQLException {
/*  571 */     return absolute(this.m_currentRow + rows);
/*      */   }
/*      */   
/*      */   public boolean previous() throws SQLException {
/*  575 */     if (getType() == 1003) {
/*  576 */       DBError.throwSQLException(6019);
/*      */     }
/*  578 */     int fetchDirection = getFetchDirection();
/*      */     
/*      */ 
/*  581 */     if (fetchDirection == 1001) {
/*  582 */       if (this.m_currentRow < this.m_columnCount) {
/*  583 */         this.m_currentRow += 1;
/*  584 */         if ((!this.m_showDeleted) && (getCurrentRow().isRowDeleted())) {
/*  585 */           return previous();
/*      */         }
/*  587 */         notifyCursorMoved();
/*  588 */         return true;
/*      */       }
/*      */       
/*  591 */       this.m_currentRow = (this.m_columnCount + 1);
/*  592 */       notifyCursorMoved();
/*  593 */       return false;
/*      */     }
/*      */     
/*      */ 
/*      */ 
/*  598 */     if ((fetchDirection == 1000) || 
/*  599 */       (fetchDirection == 1002)) {
/*  600 */       if (this.m_currentRow > 1) {
/*  601 */         this.m_currentRow -= 1;
/*  602 */         if ((!this.m_showDeleted) && (getCurrentRow().isRowDeleted())) {
/*  603 */           return previous();
/*      */         }
/*  605 */         notifyCursorMoved();
/*  606 */         return true;
/*      */       }
/*      */       
/*  609 */       this.m_currentRow = 0;
/*  610 */       notifyCursorMoved();
/*  611 */       return false;
/*      */     }
/*      */     
/*      */ 
/*  615 */     return false;
/*      */   }
/*      */   
/*      */   public boolean nextPage() throws SQLException {
/*  619 */     if ((getFetchDirection() == 1001) && 
/*  620 */       (this.m_resultSet_bs != null) && 
/*  621 */       (this.m_resultSet_bs.getType() == 1003)) {
/*  622 */       DBError.throwSQLException(20021);
/*      */     }
/*  624 */     if ((this.m_rows == null) || ((this.m_rows.size() == 0) && (!this.m_populatedDone))) {
/*  625 */       DBError.throwSQLException(20022);
/*      */     }
/*      */     
/*  628 */     if (this.m_currentPage >= this.m_pageCount) {
/*  629 */       return false;
/*      */     }
/*  631 */     populate(this.m_resultSet_bs);
/*  632 */     this.m_currentPage += 1;
/*      */     
/*  634 */     return true;
/*      */   }
/*      */   
/*      */   public boolean previousPage() throws SQLException {
/*  638 */     if ((this.m_resultSet_bs != null) && 
/*  639 */       (this.m_resultSet_bs.getType() == 1003)) {
/*  640 */       DBError.throwSQLException(20021);
/*      */     }
/*  642 */     if ((this.m_rows == null) || ((this.m_rows.size() == 0) && (!this.m_populatedDone))) {
/*  643 */       DBError.throwSQLException(20022);
/*      */     }
/*      */     
/*  646 */     if (this.m_currentPage <= 1) {
/*  647 */       return false;
/*      */     }
/*      */     
/*  650 */     this.m_resultSet_bs.relative(-(this.m_pageSize + this.m_rowCount) - 1);
/*      */     
/*  652 */     populate(this.m_resultSet_bs);
/*  653 */     this.m_currentPage -= 1;
/*      */     
/*  655 */     return true;
/*      */   }
/*      */   
/*      */   protected DmdbResultSetMetaData_bs getMetaDataInner() throws SQLException {
/*  659 */     return this.m_rsmd;
/*      */   }
/*      */   
/*      */   public boolean rowUpdated() throws SQLException {
/*  663 */     return getCurrentRow().isRowUpdated();
/*      */   }
/*      */   
/*      */   public boolean rowInserted() throws SQLException {
/*  667 */     return getCurrentRow().isRowInserted();
/*      */   }
/*      */   
/*      */   public boolean rowDeleted() throws SQLException {
/*  671 */     return getCurrentRow().isRowDeleted();
/*      */   }
/*      */   
/*      */   public void insertRow() throws SQLException {
/*  675 */     if (!this.m_insertFlag) {
/*  676 */       DBError.throwSQLException(6026);
/*      */     }
/*  678 */     if (!this.m_insertRow.isRowFullyPopulated()) {
/*  679 */       DBError.throwSQLException(20023);
/*      */     }
/*  681 */     this.m_insertRow.insertRow();
/*      */     
/*  683 */     this.m_rows.insertElementAt(this.m_insertRow, this.m_insertRowPos - 1);
/*  684 */     this.m_rowCount += 1;
/*      */     
/*  686 */     notifyRowChanged();
/*      */   }
/*      */   
/*      */   public void updateRow() throws SQLException {
/*  690 */     if (!this.m_updateFlag) {
/*  691 */       DBError.throwSQLException(6026);
/*      */     }
/*  693 */     getCurrentRow().setRowUpdated(true);
/*  694 */     this.m_updateFlag = false;
/*  695 */     notifyRowChanged();
/*      */   }
/*      */   
/*      */   public void deleteRow() throws SQLException {
/*  699 */     if (this.m_insertFlag) {
/*  700 */       throw new SQLException(
/*  701 */         Const.res.getString("error.resultsetInInsertStatus"));
/*      */     }
/*  703 */     getCurrentRow().setRowDeleted(true);
/*  704 */     notifyRowChanged();
/*      */   }
/*      */   
/*      */   public void refreshRow() throws SQLException {
/*  708 */     cancelRowUpdates();
/*      */   }
/*      */   
/*      */   public void cancelRowUpdates() throws SQLException {
/*  712 */     DmdbRow row = getCurrentRow();
/*  713 */     if (row.isRowUpdated()) {
/*  714 */       this.m_updateFlag = false;
/*  715 */       row.setRowUpdated(false);
/*  716 */       notifyRowChanged();
/*      */     }
/*      */   }
/*      */   
/*      */   public void cancelRowInsert() throws SQLException {
/*  721 */     if (this.m_insertRow != null) {
/*  722 */       this.m_rows.remove(this.m_insertRowPos - 1);
/*  723 */       this.m_rowCount -= 1;
/*      */       
/*  725 */       this.m_insertRow = null;
/*  726 */       notifyRowChanged();
/*      */     }
/*      */   }
/*      */   
/*      */   public void cancelRowDelete() throws SQLException {
/*  731 */     DmdbRow row = getCurrentRow();
/*  732 */     if (row.isRowDeleted()) {
/*  733 */       row.setRowDeleted(false);
/*  734 */       notifyRowChanged();
/*      */     }
/*      */   }
/*      */   
/*      */   public void moveToInsertRow() throws SQLException {
/*  739 */     this.m_insertRow = new DmdbRow(this.m_columnCount, true);
/*  740 */     this.m_insertFlag = true;
/*      */     
/*  742 */     if (isAfterLast()) {
/*  743 */       this.m_insertRowPos = this.m_currentRow;
/*      */     } else
/*  745 */       this.m_insertRowPos = (this.m_currentRow + 1);
/*      */   }
/*      */   
/*      */   public void moveToCurrentRow() throws SQLException {
/*  749 */     if (this.m_insertFlag) {
/*  750 */       this.m_insertFlag = false;
/*  751 */       this.m_updateFlag = false;
/*      */       
/*  753 */       absolute(this.m_currentRow);
/*      */     }
/*      */   }
/*      */   
/*      */   protected void populate(DmdbResultSet_bs data)
/*      */     throws SQLException
/*      */   {
/*  760 */     if (data == null) {
/*  761 */       DBError.throwSQLException(20025);
/*      */     }
/*      */     
/*  764 */     this.m_resultSet_bs = data;
/*  765 */     this.m_rsmd = ((DmdbResultSetMetaData_bs)this.m_resultSet_bs.getMetaData());
/*  766 */     this.m_columnCount = this.m_rsmd.getColumnCount();
/*  767 */     this.m_columnNames = new String[this.m_columnCount];
/*  768 */     for (int i = 0; i < this.m_columnCount; i++) {
/*  769 */       this.m_columnNames[i] = this.m_rsmd.getColumnName(i + 1);
/*      */     }
/*  771 */     if (this.m_columnCount < 1)
/*  772 */       return;
/*  773 */     this.m_tableName = this.m_rsmd.getTableName(1);
/*      */     
/*      */ 
/*  776 */     long rowSize = 0L;
/*  777 */     long maxRows = getMaxRows();
/*  778 */     if ((maxRows == 0L) && (this.m_pageSize == 0)) {
/*  779 */       rowSize = Long.MAX_VALUE;
/*  780 */     } else if ((maxRows == 0L) || (this.m_pageSize == 0)) {
/*  781 */       rowSize = Math.max(maxRows, this.m_pageSize);
/*      */     } else {
/*  783 */       rowSize = Math.min(maxRows, this.m_pageSize);
/*      */     }
/*      */     
/*  786 */     int fetchDirect = getFetchDirection();
/*  787 */     boolean fetchForward = (fetchDirect == 1000) || 
/*  788 */       (fetchDirect == 1002);
/*      */     
/*      */ 
/*  791 */     long rowTotal = this.m_resultSet_bs.getRowCount();
/*  792 */     this.m_pageCount = ((int)(rowTotal / rowSize));
/*  793 */     if (rowTotal % rowSize > 0L) {
/*  794 */       this.m_pageCount += 1;
/*      */     }
/*      */     
/*  797 */     if ((1 == this.m_currentPage) && (!fetchForward) && 
/*  798 */       (this.m_resultSet_bs.getType() != 1003)) {
/*  799 */       this.m_resultSet_bs.afterLast();
/*      */       
/*      */ 
/*  802 */       this.m_currentPage = (this.m_pageCount + 1);
/*      */     }
/*      */     
/*      */ 
/*  806 */     if (this.m_rows == null) {
/*  807 */       this.m_rows = new Vector(50);
/*      */     } else {
/*  809 */       this.m_rows.clear();
/*      */     }
/*      */     
/*  812 */     this.m_currentRow = 0;
/*      */     
/*  814 */     for (this.m_rowCount = 0; 
/*  815 */         (this.m_rowCount < rowSize) && 
/*  816 */           (fetchForward ? this.m_resultSet_bs.next() : this.m_resultSet_bs
/*  817 */           .previous()); this.m_rowCount += 1) {
/*  818 */       DmdbRow row = new DmdbRow(this.m_columnCount);
/*  819 */       for (int i = 0; i < this.m_columnCount; i++) {
/*  820 */         Object obj = this.m_resultSet_bs.getObject(i + 1, getTypeMap());
/*  821 */         if ((obj instanceof Clob)) {
/*  822 */           DmdbSerialClob clob = new DmdbSerialClob((Clob)obj);
/*  823 */           row.setColumnValue(i, clob);
/*      */ 
/*      */ 
/*      */         }
/*  827 */         else if ((obj instanceof Blob)) {
/*  828 */           DmdbSerialBlob blob = new DmdbSerialBlob((Blob)obj);
/*  829 */           row.setColumnValue(i, blob);
/*      */         }
/*      */         else
/*      */         {
/*  833 */           row.setColumnValue(i, obj);
/*      */           
/*  835 */           row.setOriginalNull(i, this.m_resultSet_bs.wasNull());
/*      */         }
/*      */       }
/*  838 */       if (fetchForward) {
/*  839 */         this.m_rows.add(row);
/*      */       } else {
/*  841 */         this.m_rows.add(0, row);
/*      */       }
/*      */     }
/*  844 */     if (((fetchForward) && (this.m_resultSet_bs.isAfterLast())) || ((!fetchForward) && 
/*  845 */       (this.m_resultSet_bs.isBeforeFirst()))) {
/*  846 */       this.m_populatedDone = true;
/*      */     }
/*  848 */     notifyRowSetChanged();
/*      */   }
/*      */   
/*      */   protected void populate(DmdbResultSet_bs rs, int startRow) throws SQLException
/*      */   {
/*  853 */     if (startRow < 0) {
/*  854 */       DBError.throwSQLException(20024);
/*      */     }
/*  856 */     if (rs == null) {
/*  857 */       DBError.throwSQLException(20025);
/*      */     }
/*  859 */     if (rs.getRowCount() < startRow) {
/*  860 */       DBError.throwSQLException(20026);
/*      */     }
/*  862 */     rs.absolute(startRow);
/*      */     
/*      */ 
/*  865 */     int fetchDirect = rs.getFetchDirection();
/*  866 */     boolean fetchForward = (fetchDirect == 1000) || 
/*  867 */       (fetchDirect == 1002);
/*      */     
/*      */ 
/*  870 */     if (fetchForward) {
/*  871 */       rs.previous();
/*      */     }
/*      */     else {
/*  874 */       rs.next();
/*      */     }
/*  876 */     populate(rs);
/*      */   }
/*      */   
/*      */   protected void execute() throws SQLException {
/*  880 */     this.m_reader.readData(this);
/*      */   }
/*      */   
/*      */   protected void execute(DmdbConnection_bs conn) throws SQLException {
/*  884 */     this.m_KeepConnecting = true;
/*  885 */     m_conn_bs = conn;
/*  886 */     this.m_reader.readData(this);
/*      */   }
/*      */   
/*      */   protected void acceptChanges() throws SyncProviderException {
/*      */     try {
/*  891 */       this.m_writer.writeData(this);
/*      */     } catch (SQLException sqlexception) {
/*  893 */       throw new SyncProviderException(sqlexception.getMessage());
/*      */     }
/*      */   }
/*      */   
/*      */   protected void acceptChanges(DmdbConnection_bs con) throws SyncProviderException
/*      */   {
/*  899 */     this.m_KeepConnecting = true;
/*  900 */     m_conn_bs = con;
/*  901 */     acceptChanges();
/*      */   }
/*      */   
/*      */   public void restoreOriginal() throws SQLException {
/*  905 */     for (int i = 0; i < this.m_rowCount; i++) {
/*  906 */       DmdbRow row = (DmdbRow)this.m_rows.elementAt(i);
/*  907 */       if (row.isRowInserted()) {
/*  908 */         this.m_rows.remove(i);
/*  909 */         this.m_rowCount -= 1;
/*  910 */         i--;
/*      */ 
/*      */ 
/*      */ 
/*      */       }
/*  915 */       else if (row.isRowUpdated()) {
/*  916 */         row.setRowUpdated(false);
/*      */ 
/*      */ 
/*      */ 
/*      */       }
/*  921 */       else if (row.isRowDeleted()) {
/*  922 */         row.setRowDeleted(false);
/*      */       }
/*      */     }
/*  925 */     notifyRowSetChanged();
/*      */   }
/*      */   
/*      */   public void release() throws SQLException {
/*  929 */     uninitialize();
/*  930 */     notifyRowSetChanged();
/*      */   }
/*      */   
/*      */   public void close() throws SQLException {
/*  934 */     if (this.m_closed) {
/*  935 */       return;
/*      */     }
/*  937 */     if ((m_conn_bs != null) && (!m_conn_bs.isClosed())) {
/*  938 */       m_conn_bs.close();
/*  939 */       m_conn_bs = null;
/*      */     }
/*      */     
/*  942 */     release();
/*      */     
/*  944 */     this.m_closed = true;
/*      */   }
/*      */   
/*      */   public void undoDelete() throws SQLException {
/*  948 */     if (this.m_insertFlag) {
/*  949 */       throw new SQLException(
/*  950 */         Const.res.getString("error.resultsetInInsertStatus"));
/*      */     }
/*  952 */     if ((isBeforeFirst()) || (isAfterLast())) {
/*  953 */       throw new SQLException(
/*  954 */         Const.res.getString("error.cursorNotInResultSet"));
/*      */     }
/*  956 */     DmdbRow row = getCurrentRow();
/*  957 */     if (!row.isRowDeleted()) {
/*  958 */       throw new SQLException(
/*  959 */         Const.res.getString("error.cachedRowSetCRowNDel"));
/*      */     }
/*  961 */     row.setRowDeleted(false);
/*  962 */     notifyRowChanged();
/*      */   }
/*      */   
/*      */   public void undoInsert() throws SQLException {
/*  966 */     if (this.m_insertFlag) {
/*  967 */       throw new SQLException(
/*  968 */         Const.res.getString("error.resultsetInInsertStatus"));
/*      */     }
/*  970 */     if ((isBeforeFirst()) || (isAfterLast())) {
/*  971 */       throw new SQLException(
/*  972 */         Const.res.getString("error.cursorNotInResultSet"));
/*      */     }
/*  974 */     DmdbRow row = getCurrentRow();
/*  975 */     if (!row.isRowInserted()) {
/*  976 */       throw new SQLException(
/*  977 */         Const.res.getString("error.cachedRowSetCRowNIns"));
/*      */     }
/*  979 */     this.m_rows.remove(--this.m_currentRow);
/*  980 */     this.m_rowCount -= 1;
/*  981 */     notifyRowChanged();
/*      */   }
/*      */   
/*      */   public void undoUpdate() throws SQLException {
/*  985 */     if (this.m_insertFlag) {
/*  986 */       throw new SQLException(
/*  987 */         Const.res.getString("error.resultsetInInsertStatus"));
/*      */     }
/*  989 */     if ((isBeforeFirst()) || (isAfterLast())) {
/*  990 */       throw new SQLException(
/*  991 */         Const.res.getString("error.cursorNotInResultSet"));
/*      */     }
/*  993 */     DmdbRow row = getCurrentRow();
/*  994 */     if (!row.isRowUpdated()) {
/*  995 */       throw new SQLException(
/*  996 */         Const.res.getString("error.cachedRowSetCRowNUpd"));
/*      */     }
/*  998 */     row.setRowUpdated(false);
/*  999 */     notifyRowChanged();
/*      */   }
/*      */   
/*      */   public boolean columnUpdated(int idx) throws SQLException {
/* 1003 */     checkColumn(idx);
/* 1004 */     checkCurrentRow();
/*      */     
/* 1006 */     return getCurrentRow().isColumnChanged(idx - 1);
/*      */   }
/*      */   
/*      */   public boolean columnUpdated(String columnName) throws SQLException {
/* 1010 */     int idx = findColumn(columnName);
/*      */     
/* 1012 */     return columnUpdated(idx);
/*      */   }
/*      */   
/*      */   public Collection<?> toCollection() throws SQLException
/*      */   {
/* 1017 */     Map map = Collections.synchronizedMap(new TreeMap());
/*      */     try {
/* 1019 */       for (int i = 0; i < this.m_rowCount; i++)
/* 1020 */         map.put(new Integer(i), ((DmdbRow)this.m_rows.elementAt(i)).toCollection());
/*      */     } catch (Exception exception) {
/* 1022 */       map = null;
/* 1023 */       throw new SQLException(
/* 1024 */         Const.res.getString("error.cachedRowSetToClcFailed"));
/*      */     }
/* 1026 */     return map.values();
/*      */   }
/*      */   
/*      */   public Collection<?> toCollection(int column) throws SQLException {
/* 1030 */     checkColumn(column);
/*      */     
/* 1032 */     Vector<Object> cols = new Vector(this.m_rowCount);
/* 1033 */     for (int i = 0; i < this.m_rowCount; i++) {
/* 1034 */       DmdbRow row = (DmdbRow)this.m_rows.elementAt(i);
/* 1035 */       Object obj = row.isColumnChanged(column - 1) ? row
/* 1036 */         .getChangedColumn(column - 1) : row.getColumn(column - 1);
/* 1037 */       cols.add(obj);
/*      */     }
/*      */     
/* 1040 */     return cols;
/*      */   }
/*      */   
/*      */   public Collection<?> toCollection(String column) throws SQLException {
/* 1044 */     int idx = findColumn(column);
/* 1045 */     return toCollection(idx);
/*      */   }
/*      */   
/*      */   public SyncProvider getSyncProvider() throws SQLException {
/* 1049 */     return this.m_syncProvider;
/*      */   }
/*      */   
/*      */   public void setSyncProvider(String provider) throws SQLException {
/*      */     try {
/* 1054 */       this.m_syncProvider = SyncFactory.getInstance(provider);
/*      */     } catch (SyncFactoryException syncfactoryexception) {
/* 1056 */       throw new SQLException("SyncProvider instance not constructed.");
/*      */     }
/*      */   }
/*      */   
/*      */   public int size() {
/* 1061 */     return this.m_rowCount;
/*      */   }
/*      */   
/*      */   public void setMetaData(DmdbResultSetMetaData_bs md) throws SQLException {
/* 1065 */     this.m_rsmd = md;
/* 1066 */     if (this.m_rsmd != null) {
/* 1067 */       this.m_columnCount = this.m_rsmd.getColumnCount();
/* 1068 */       this.m_columnNames = new String[this.m_columnCount];
/* 1069 */       for (int i = 0; i < this.m_columnCount; i++)
/* 1070 */         this.m_columnNames[i] = this.m_rsmd.getColumnName(i + 1);
/*      */     }
/*      */   }
/*      */   
/*      */   protected DmdbRow getOriginalRowData() throws SQLException {
/* 1075 */     return new DmdbRow(this.m_columnCount, getCurrentRow().getOriginalRow());
/*      */   }
/*      */   
/*      */   public void setOriginalRow() throws SQLException {
/* 1079 */     checkCurrentRow();
/*      */     
/* 1081 */     setOriginalRowInner(this.m_currentRow);
/*      */   }
/*      */   
/*      */   public String getTableName() throws SQLException {
/* 1085 */     return this.m_tableName;
/*      */   }
/*      */   
/*      */   public void setTableName(String tabName) throws SQLException {
/* 1089 */     if (tabName == null) {
/* 1090 */       throw new SQLException(
/* 1091 */         Const.res.getString("error.cachedRowSetTabNameNull"));
/*      */     }
/* 1093 */     this.m_tableName = tabName;
/*      */   }
/*      */   
/*      */   public int[] getKeyColumns() throws SQLException {
/* 1097 */     checkRowSet();
/*      */     
/* 1099 */     return this.m_keyColumns;
/*      */   }
/*      */   
/*      */   public void setKeyColumns(int[] keys) throws SQLException {
/* 1103 */     boolean valid = true;
/* 1104 */     if (keys == null) {
/* 1105 */       valid = false;
/*      */     } else {
/* 1107 */       for (int i = 0; i < keys.length; i++) {
/* 1108 */         if ((keys[i] < 1) || (keys[i] > this.m_columnCount)) {
/* 1109 */           valid = false;
/* 1110 */           break;
/*      */         }
/*      */       }
/*      */     }
/* 1114 */     if (!valid) {
/* 1115 */       throw new SQLException(
/* 1116 */         Const.res.getString("error.cachedRowSetColKeyInvalid"));
/*      */     }
/* 1118 */     this.m_keyColumns = keys;
/*      */   }
/*      */   
/*      */   public RowSetWarning getRowSetWarnings() throws SQLException {
/* 1122 */     return this.m_rowsetWarning;
/*      */   }
/*      */   
/*      */   public void setPageSize(int size) throws SQLException {
/* 1126 */     if ((size < 1) || ((getMaxRows() > 0) && (size > getMaxRows()))) {
/* 1127 */       throw new SQLException(
/* 1128 */         Const.res.getString("error.cachedRowSetPageSizeInvalid"));
/*      */     }
/* 1130 */     this.m_pageSize = size;
/*      */   }
/*      */   
/*      */   public int getPageSize() {
/* 1134 */     return this.m_pageSize;
/*      */   }
/*      */   
/*      */   public int findColumn(String columnName) throws SQLException
/*      */   {
/* 1139 */     if (this.m_columnNames == null) {
/* 1140 */       DBError.throwSQLException(6017);
/*      */     }
/* 1142 */     int ret = -1;
/* 1143 */     for (int i = 0; i < this.m_columnNames.length; i++) {
/* 1144 */       if (this.m_columnNames[i].equalsIgnoreCase(columnName)) {
/* 1145 */         ret = i + 1;
/* 1146 */         break;
/*      */       }
/*      */     }
/*      */     
/* 1150 */     if (ret < 1) {
/* 1151 */       DBError.throwSQLException(6017);
/*      */     }
/* 1153 */     return ret;
/*      */   }
/*      */   
/*      */   public Object[] getParams() throws SQLException {
/* 1157 */     Vector<DmdbParameter> params = getParamsInner();
/*      */     
/* 1159 */     int size = params.size();
/* 1160 */     Object[] objs = new Object[size];
/* 1161 */     for (int i = 0; i < size; i++) {
/* 1162 */       objs[i] = ((DmdbParameter)params.elementAt(i)).getParams()[0];
/*      */     }
/* 1164 */     return objs;
/*      */   }
/*      */   
/*      */   public void setReader(RowSetReader reader) {
/* 1168 */     this.m_reader = ((DmdbCachedRowSetReaderInner)reader);
/*      */   }
/*      */   
/*      */   public void setWriter(RowSetWriter writer) {
/* 1172 */     this.m_writer = ((DmdbCachedRowSetWriterInner)writer);
/*      */   }
/*      */   
/*      */   protected void rowsetShared(DmdbCachedRowSet_bs cachedrowset) throws SQLException
/*      */   {
/* 1177 */     cachedrowset.m_rows = this.m_rows;
/* 1178 */     cachedrowset.setDataSourceName(getDataSourceName());
/* 1179 */     cachedrowset.setUsername(getUsername());
/* 1180 */     cachedrowset.setPassword(getPassword());
/* 1181 */     cachedrowset.setUrl(getUrl());
/* 1182 */     cachedrowset.setTypeMap(getTypeMap());
/* 1183 */     cachedrowset.setMaxFieldSize(getMaxFieldSize());
/* 1184 */     cachedrowset.setMaxRows(getMaxRows());
/* 1185 */     cachedrowset.setQueryTimeout(getQueryTimeout());
/* 1186 */     cachedrowset.setFetchSize(getFetchSize());
/* 1187 */     cachedrowset.setEscapeProcessing(getEscapeProcessing());
/* 1188 */     cachedrowset.setConcurrency(getConcurrency());
/* 1189 */     cachedrowset.setReadOnly(isReadOnly());
/* 1190 */     cachedrowset.setType(getType());
/* 1191 */     cachedrowset.setFetchDirection(getFetchDirection());
/* 1192 */     cachedrowset.setCommand(getCommand());
/* 1193 */     cachedrowset.setTransactionIsolation(getTransactionIsolation());
/* 1194 */     cachedrowset.m_currentRow = this.m_currentRow;
/* 1195 */     cachedrowset.m_columnCount = this.m_columnCount;
/* 1196 */     cachedrowset.m_rowCount = this.m_rowCount;
/* 1197 */     cachedrowset.m_showDeleted = this.m_showDeleted;
/* 1198 */     cachedrowset.m_syncProvider = this.m_syncProvider;
/* 1199 */     cachedrowset.m_currentPage = this.m_currentPage;
/* 1200 */     cachedrowset.m_pageSize = this.m_pageSize;
/* 1201 */     cachedrowset.m_tableName = this.m_tableName;
/* 1202 */     cachedrowset.m_keyColumns = (this.m_keyColumns != null ? 
/* 1203 */       (int[])this.m_keyColumns.clone() : null);
/* 1204 */     int i = this.m_listeners.size();
/* 1205 */     for (int j = 0; j < i; j++) {
/* 1206 */       cachedrowset.m_listeners.add((RowSetListener)this.m_listeners.elementAt(j));
/*      */     }
/* 1208 */     cachedrowset.m_rsmd = this.m_rsmd;
/* 1209 */     i = this.m_params.size();
/* 1210 */     for (int k = 0; k < i; k++) {
/* 1211 */       cachedrowset.m_params.add((DmdbParameter)this.m_params.elementAt(k));
/*      */     }
/* 1213 */     if (this.m_columnNames != null) {
/* 1214 */       cachedrowset.m_columnNames = new String[this.m_columnNames.length];
/* 1215 */       System.arraycopy(this.m_columnNames, 0, cachedrowset.m_columnNames, 0, 
/* 1216 */         this.m_columnNames.length);
/*      */     }
/*      */   }
/*      */   
/*      */   protected void rowsetCopy(DmdbCachedRowSet_bs rowset) throws SQLException {
/* 1221 */     rowsetShared(rowset);
/*      */     
/* 1223 */     rowset.m_rows = new Vector(rowset.m_rowCount);
/* 1224 */     for (int j = 0; j < this.m_rowCount; j++) {
/* 1225 */       rowset.m_rows.add(((DmdbRow)this.m_rows.elementAt(j)).createCopy());
/*      */     }
/*      */   }
/*      */   
/*      */   public void setTIME(int parameterIndex, DmdbTime dt) throws SQLException {
/* 1230 */     setObjectInner(Integer.valueOf(parameterIndex), dt);
/*      */   }
/*      */   
/*      */   public void setTIME(String parameterName, DmdbTime dt) throws SQLException {
/* 1234 */     setObjectInner(parameterName, dt);
/*      */   }
/*      */   
/*      */   public void setINTERVALDT(int parameterIndex, DmdbIntervalDT dt) throws SQLException
/*      */   {
/* 1239 */     setObjectInner(Integer.valueOf(parameterIndex), dt);
/*      */   }
/*      */   
/*      */   public void setINTERVALDT(String parameterName, DmdbIntervalDT dt) throws SQLException
/*      */   {
/* 1244 */     setObjectInner(parameterName, dt);
/*      */   }
/*      */   
/*      */   public void setINTERVALYM(int parameterIndex, DmdbIntervalYM ym) throws SQLException
/*      */   {
/* 1249 */     setObjectInner(Integer.valueOf(parameterIndex), ym);
/*      */   }
/*      */   
/*      */   public void setINTERVALYM(String parameterName, DmdbIntervalYM ym) throws SQLException
/*      */   {
/* 1254 */     setObjectInner(parameterName, ym);
/*      */   }
/*      */   
/*      */   public void updateINTERVALYM(int i, DmdbIntervalYM ym) throws SQLException {
/* 1258 */     updateObjectInner(i, ym);
/*      */   }
/*      */   
/*      */   public void updateINTERVALYM(String s, DmdbIntervalYM ym) throws SQLException
/*      */   {
/* 1263 */     updateINTERVALYM(findColumn(s), ym);
/*      */   }
/*      */   
/*      */   public void updateINTERVALDT(int i, DmdbIntervalDT dt) throws SQLException {
/* 1267 */     updateObjectInner(i, dt);
/*      */   }
/*      */   
/*      */   public void updateINTERVALDT(String s, DmdbIntervalDT dt) throws SQLException
/*      */   {
/* 1272 */     updateINTERVALDT(findColumn(s), dt);
/*      */   }
/*      */   
/*      */   public void setNull(int parameterIndex, int sqlType) throws SQLException
/*      */   {
/* 1277 */     setObjectInner(Integer.valueOf(parameterIndex), null, sqlType, false);
/*      */   }
/*      */   
/*      */   public void setNull(int paramIndex, int sqlType, String typeName) throws SQLException
/*      */   {
/* 1282 */     setObjectInner(Integer.valueOf(paramIndex), null, sqlType, typeName);
/*      */   }
/*      */   
/*      */   public void setBoolean(int parameterIndex, boolean x) throws SQLException {
/* 1286 */     setObjectInner(Integer.valueOf(parameterIndex), Boolean.valueOf(x));
/*      */   }
/*      */   
/*      */   public void setByte(int parameterIndex, byte x) throws SQLException {
/* 1290 */     setObjectInner(Integer.valueOf(parameterIndex), Byte.valueOf(x));
/*      */   }
/*      */   
/*      */   public void setShort(int parameterIndex, short x) throws SQLException {
/* 1294 */     setObjectInner(Integer.valueOf(parameterIndex), Short.valueOf(x));
/*      */   }
/*      */   
/*      */   public void setInt(int parameterIndex, int x) throws SQLException {
/* 1298 */     setObjectInner(Integer.valueOf(parameterIndex), Integer.valueOf(x));
/*      */   }
/*      */   
/*      */   public void setLong(int parameterIndex, long x) throws SQLException {
/* 1302 */     setObjectInner(Integer.valueOf(parameterIndex), Long.valueOf(x));
/*      */   }
/*      */   
/*      */   public void setFloat(int parameterIndex, float x) throws SQLException {
/* 1306 */     setObjectInner(Integer.valueOf(parameterIndex), Float.valueOf(x));
/*      */   }
/*      */   
/*      */   public void setDouble(int parameterIndex, double x) throws SQLException {
/* 1310 */     setObjectInner(Integer.valueOf(parameterIndex), Double.valueOf(x));
/*      */   }
/*      */   
/*      */   public void setBigDecimal(int parameterIndex, BigDecimal x) throws SQLException
/*      */   {
/* 1315 */     setObjectInner(Integer.valueOf(parameterIndex), x);
/*      */   }
/*      */   
/*      */   public void setString(int parameterIndex, String x) throws SQLException {
/* 1319 */     setObjectInner(Integer.valueOf(parameterIndex), x);
/*      */   }
/*      */   
/*      */   public void setBytes(int parameterIndex, byte[] x) throws SQLException {
/* 1323 */     setObjectInner(Integer.valueOf(parameterIndex), x);
/*      */   }
/*      */   
/*      */   public void setDate(int parameterIndex, Date x) throws SQLException {
/* 1327 */     setObjectInner(Integer.valueOf(parameterIndex), x);
/*      */   }
/*      */   
/*      */   public void setTime(int parameterIndex, Time x) throws SQLException {
/* 1331 */     setObjectInner(Integer.valueOf(parameterIndex), x);
/*      */   }
/*      */   
/*      */   public void setTimestamp(int parameterIndex, Timestamp x) throws SQLException
/*      */   {
/* 1336 */     setObjectInner(Integer.valueOf(parameterIndex), x);
/*      */   }
/*      */   
/*      */   public void setAsciiStream(int parameterIndex, InputStream x, int length) throws SQLException
/*      */   {
/* 1341 */     setObjectInner(Integer.valueOf(parameterIndex), x, length, false);
/*      */   }
/*      */   
/*      */   public void setBinaryStream(int parameterIndex, InputStream x, int length) throws SQLException
/*      */   {
/* 1346 */     setObjectInner(Integer.valueOf(parameterIndex), x, length, false);
/*      */   }
/*      */   
/*      */   public void setCharacterStream(int parameterIndex, Reader reader, int length) throws SQLException
/*      */   {
/* 1351 */     setObjectInner(Integer.valueOf(parameterIndex), reader, length, false);
/*      */   }
/*      */   
/*      */   public void setObject(int parameterIndex, Object x, int targetSqlType, int scale) throws SQLException
/*      */   {
/* 1356 */     setObjectInner(Integer.valueOf(parameterIndex), x, targetSqlType, scale);
/*      */   }
/*      */   
/*      */   public void setObject(int parameterIndex, Object x, int targetSqlType) throws SQLException
/*      */   {
/* 1361 */     setObjectInner(Integer.valueOf(parameterIndex), x, targetSqlType, true);
/*      */   }
/*      */   
/*      */   public void setObject(int parameterIndex, Object x) throws SQLException {
/* 1365 */     setObjectInner(Integer.valueOf(parameterIndex), x);
/*      */   }
/*      */   
/*      */   public void setRef(int i, Ref x) throws SQLException
/*      */   {}
/*      */   
/*      */   public void setBlob(int i, Blob x) throws SQLException
/*      */   {
/* 1373 */     setObjectInner(Integer.valueOf(i), x);
/*      */   }
/*      */   
/*      */   public void setClob(int i, Clob x) throws SQLException {
/* 1377 */     setObjectInner(Integer.valueOf(i), x);
/*      */   }
/*      */   
/*      */   public void setArray(int i, Array x)
/*      */     throws SQLException
/*      */   {}
/*      */   
/*      */   public void setDate(int parameterIndex, Date x, Calendar cal) throws SQLException
/*      */   {
/* 1386 */     setObjectInner(Integer.valueOf(parameterIndex), x, cal);
/*      */   }
/*      */   
/*      */   public void setTime(int parameterIndex, Time x, Calendar cal) throws SQLException
/*      */   {
/* 1391 */     setObjectInner(Integer.valueOf(parameterIndex), x, cal);
/*      */   }
/*      */   
/*      */   public void setTimestamp(int parameterIndex, Timestamp x, Calendar cal) throws SQLException
/*      */   {
/* 1396 */     setObjectInner(Integer.valueOf(parameterIndex), x, cal);
/*      */   }
/*      */   
/*      */   public void clearParameters() throws SQLException {
/* 1400 */     this.m_params.clear();
/*      */   }
/*      */   
/*      */   public boolean wasNull() throws SQLException {
/* 1404 */     return this.m_previousColNull;
/*      */   }
/*      */   
/*      */   public boolean getBoolean(int columnIndex) throws SQLException {
/* 1408 */     Object obj = getObjectInner(columnIndex);
/* 1409 */     if (obj == null) {
/* 1410 */       return false;
/*      */     }
/* 1412 */     if ((obj instanceof Boolean)) {
/* 1413 */       return ((Boolean)obj).booleanValue();
/*      */     }
/* 1415 */     if ((obj instanceof Number)) {
/* 1416 */       return ((Number)obj).doubleValue() != 0.0D;
/*      */     }
/* 1418 */     throw new SQLException(Const.res.getString("error.dataConvertionError"));
/*      */   }
/*      */   
/*      */   public short getShort(int columnIndex) throws SQLException {
/* 1422 */     Number num = getNumber(columnIndex);
/* 1423 */     return num == null ? 0 : num.shortValue();
/*      */   }
/*      */   
/*      */   public int getInt(int columnIndex) throws SQLException {
/* 1427 */     Number num = getNumber(columnIndex);
/* 1428 */     return num == null ? 0 : num.intValue();
/*      */   }
/*      */   
/*      */   public long getLong(int columnIndex) throws SQLException {
/* 1432 */     Number num = getNumber(columnIndex);
/* 1433 */     return num == null ? 0L : num.longValue();
/*      */   }
/*      */   
/*      */   public float getFloat(int columnIndex) throws SQLException {
/* 1437 */     Number num = getNumber(columnIndex);
/* 1438 */     return num == null ? 0.0F : num.floatValue();
/*      */   }
/*      */   
/*      */   public double getDouble(int columnIndex) throws SQLException {
/* 1442 */     Number num = getNumber(columnIndex);
/* 1443 */     return num == null ? 0.0D : num.doubleValue();
/*      */   }
/*      */   
/*      */   public BigDecimal getBigDecimal(int columnIndex, int scale) throws SQLException
/*      */   {
/* 1448 */     Number num = getNumber(columnIndex);
/* 1449 */     if (num == null) {
/* 1450 */       return null;
/*      */     }
/* 1452 */     BigDecimal bd = null;
/* 1453 */     if ((num instanceof BigDecimal)) {
/* 1454 */       bd = (BigDecimal)num;
/*      */     } else {
/* 1456 */       bd = new BigDecimal(num.doubleValue());
/*      */     }
/* 1458 */     bd.setScale(scale);
/*      */     
/* 1460 */     return bd;
/*      */   }
/*      */   
/*      */   public Date getDate(int columnIndex) throws SQLException {
/* 1464 */     Object obj = getObjectInner(columnIndex);
/* 1465 */     if (obj == null) {
/* 1466 */       return null;
/*      */     }
/* 1468 */     if ((obj instanceof Date)) {
/* 1469 */       return (Date)obj;
/*      */     }
/* 1471 */     if ((obj instanceof Time)) {
/* 1472 */       Time time = (Time)obj;
/* 1473 */       return new Date(time.getTime());
/*      */     }
/*      */     
/* 1476 */     if ((obj instanceof Timestamp)) {
/* 1477 */       Timestamp timestamp = (Timestamp)obj;
/* 1478 */       return new Date(timestamp.getYear(), timestamp.getMonth(), 
/* 1479 */         timestamp.getDay());
/*      */     }
/*      */     
/* 1482 */     if ((obj instanceof String)) {
/* 1483 */       return DmdbDateTime.getDateByString((String)obj);
/*      */     }
/* 1485 */     throw new SQLException(Const.res.getString("error.dataConvertionError"));
/*      */   }
/*      */   
/*      */   public Time getTime(int columnIndex) throws SQLException {
/* 1489 */     Object obj = getObjectInner(columnIndex);
/* 1490 */     if (obj == null) {
/* 1491 */       return null;
/*      */     }
/* 1493 */     if ((obj instanceof Time)) {
/* 1494 */       return (Time)obj;
/*      */     }
/* 1496 */     if ((obj instanceof Date)) {
/* 1497 */       Date date = (Date)obj;
/* 1498 */       return new Time(date.getTime());
/*      */     }
/*      */     
/* 1501 */     if ((obj instanceof Timestamp)) {
/* 1502 */       Timestamp timstamp = (Timestamp)obj;
/* 1503 */       return new Time(timstamp.getTime());
/*      */     }
/*      */     
/* 1506 */     if ((obj instanceof String))
/*      */     {
/* 1508 */       Timestamp timstamp = DmdbDateTime.getTimestampByString(
/* 1509 */         (String)obj, 0, 0, 0);
/* 1510 */       return new Time(timstamp.getTime());
/*      */     }
/*      */     
/* 1513 */     throw new SQLException(Const.res.getString("error.dataConvertionError"));
/*      */   }
/*      */   
/*      */   public Timestamp getTimestamp(int columnIndex) throws SQLException
/*      */   {
/* 1518 */     Object obj = getObjectInner(columnIndex);
/* 1519 */     if (obj == null) {
/* 1520 */       return null;
/*      */     }
/* 1522 */     if ((obj instanceof Timestamp)) {
/* 1523 */       return (Timestamp)obj;
/*      */     }
/* 1525 */     if ((obj instanceof Time)) {
/* 1526 */       return new Timestamp(((Time)obj).getTime());
/*      */     }
/* 1528 */     if ((obj instanceof Date)) {
/* 1529 */       return new Timestamp(((Date)obj).getTime());
/*      */     }
/*      */     
/* 1532 */     if ((obj instanceof String)) {
/* 1533 */       return DmdbDateTime.getTimestampByString((String)obj, 0, 0, 0);
/*      */     }
/* 1535 */     throw new SQLException(Const.res.getString("error.dataConvertionError"));
/*      */   }
/*      */   
/*      */   public InputStream getAsciiStream(int columnIndex) throws SQLException {
/* 1539 */     return getStreamInner(columnIndex);
/*      */   }
/*      */   
/*      */   public InputStream getUnicodeStream(int columnIndex) throws SQLException {
/* 1543 */     Object obj = getObjectInner(columnIndex);
/* 1544 */     if (obj == null) {
/* 1545 */       return null;
/*      */     }
/* 1547 */     if ((obj instanceof String)) {
/* 1548 */       return new StringBufferInputStream((String)obj);
/*      */     }
/* 1550 */     throw new SQLException(Const.res.getString("error.dataConvertionError"));
/*      */   }
/*      */   
/*      */   public InputStream getBinaryStream(int columnIndex) throws SQLException {
/* 1554 */     return getStreamInner(columnIndex);
/*      */   }
/*      */   
/*      */   public boolean getBoolean(String columnName) throws SQLException {
/* 1558 */     return getBoolean(findColumn(columnName));
/*      */   }
/*      */   
/*      */   public short getShort(String columnName) throws SQLException {
/* 1562 */     return getShort(findColumn(columnName));
/*      */   }
/*      */   
/*      */   public int getInt(String columnName) throws SQLException {
/* 1566 */     return getInt(findColumn(columnName));
/*      */   }
/*      */   
/*      */   public long getLong(String columnName) throws SQLException {
/* 1570 */     return getLong(findColumn(columnName));
/*      */   }
/*      */   
/*      */   public float getFloat(String columnName) throws SQLException {
/* 1574 */     return getFloat(findColumn(columnName));
/*      */   }
/*      */   
/*      */   public double getDouble(String columnName) throws SQLException {
/* 1578 */     return getDouble(findColumn(columnName));
/*      */   }
/*      */   
/*      */   public BigDecimal getBigDecimal(String columnName, int scale) throws SQLException
/*      */   {
/* 1583 */     return getBigDecimal(findColumn(columnName), scale);
/*      */   }
/*      */   
/*      */   public Date getDate(String columnName) throws SQLException {
/* 1587 */     return getDate(findColumn(columnName));
/*      */   }
/*      */   
/*      */   public Time getTime(String columnName) throws SQLException {
/* 1591 */     return getTime(findColumn(columnName));
/*      */   }
/*      */   
/*      */   public Timestamp getTimestamp(String columnName) throws SQLException {
/* 1595 */     return getTimestamp(findColumn(columnName));
/*      */   }
/*      */   
/*      */   public InputStream getAsciiStream(String columnName) throws SQLException {
/* 1599 */     return getAsciiStream(findColumn(columnName));
/*      */   }
/*      */   
/*      */   public InputStream getUnicodeStream(String columnName) throws SQLException {
/* 1603 */     return getUnicodeStream(findColumn(columnName));
/*      */   }
/*      */   
/*      */   public InputStream getBinaryStream(String columnName) throws SQLException {
/* 1607 */     return getBinaryStream(findColumn(columnName));
/*      */   }
/*      */   
/*      */   public SQLWarning getWarnings() throws SQLException {
/* 1611 */     return this.m_sqlWarning;
/*      */   }
/*      */   
/*      */   public void clearWarnings() throws SQLException {
/* 1615 */     this.m_sqlWarning = null;
/*      */   }
/*      */   
/*      */   public String getCursorName() throws SQLException {
/* 1619 */     throw new UnsupportedOperationException();
/*      */   }
/*      */   
/*      */   public Object getObject(int columnIndex) throws SQLException {
/* 1623 */     return getObjectInner(columnIndex, getTypeMap());
/*      */   }
/*      */   
/*      */   public Object getObject(String columnName) throws SQLException {
/* 1627 */     return getObject(findColumn(columnName));
/*      */   }
/*      */   
/*      */   public Reader getCharacterStream(int columnIndex) throws SQLException {
/* 1631 */     Object obj = getObjectInner(columnIndex);
/* 1632 */     if (obj == null) {
/* 1633 */       return null;
/*      */     }
/* 1635 */     if ((obj instanceof byte[])) {
/* 1636 */       return new InputStreamReader(new ByteArrayInputStream((byte[])obj));
/*      */     }
/* 1638 */     if ((obj instanceof Byte)) {
/* 1639 */       byte[] bs = new byte[1];
/* 1640 */       bs[0] = ((Byte)obj).byteValue();
/* 1641 */       return new InputStreamReader(new ByteArrayInputStream(bs));
/*      */     }
/*      */     
/* 1644 */     if ((obj instanceof String)) {
/* 1645 */       return new StringReader((String)obj);
/*      */     }
/* 1647 */     if ((obj instanceof Blob)) {
/* 1648 */       return new InputStreamReader(((SerialBlob)obj).getBinaryStream());
/*      */     }
/* 1650 */     if ((obj instanceof Clob)) {
/* 1651 */       return ((SerialClob)obj).getCharacterStream();
/*      */     }
/* 1653 */     throw new SQLException(Const.res.getString("error.dataConvertionError"));
/*      */   }
/*      */   
/*      */   public Reader getCharacterStream(String columnName) throws SQLException {
/* 1657 */     return getCharacterStream(findColumn(columnName));
/*      */   }
/*      */   
/*      */   public BigDecimal getBigDecimal(int columnIndex) throws SQLException {
/* 1661 */     Number num = getNumber(columnIndex);
/* 1662 */     if (num == null) {
/* 1663 */       return null;
/*      */     }
/* 1665 */     if ((num instanceof BigDecimal)) {
/* 1666 */       return (BigDecimal)num;
/*      */     }
/* 1668 */     return new BigDecimal(num.doubleValue());
/*      */   }
/*      */   
/*      */   public BigDecimal getBigDecimal(String columnName) throws SQLException {
/* 1672 */     return getBigDecimal(findColumn(columnName));
/*      */   }
/*      */   
/*      */   public int getRow() throws SQLException {
/* 1676 */     return this.m_currentRow;
/*      */   }
/*      */   
/*      */   public void updateNull(int columnIndex) throws SQLException {
/* 1680 */     updateObjectInner(columnIndex, null);
/*      */   }
/*      */   
/*      */   public void updateBoolean(int columnIndex, boolean x) throws SQLException {
/* 1684 */     updateObjectInner(columnIndex, Boolean.valueOf(x));
/*      */   }
/*      */   
/*      */   public void updateByte(int columnIndex, byte x) throws SQLException {
/* 1688 */     updateObjectInner(columnIndex, Byte.valueOf(x));
/*      */   }
/*      */   
/*      */   public void updateShort(int columnIndex, short x) throws SQLException {
/* 1692 */     updateObjectInner(columnIndex, Short.valueOf(x));
/*      */   }
/*      */   
/*      */   public void updateInt(int columnIndex, int x) throws SQLException {
/* 1696 */     updateObjectInner(columnIndex, Integer.valueOf(x));
/*      */   }
/*      */   
/*      */   public void updateLong(int columnIndex, long x) throws SQLException {
/* 1700 */     updateObjectInner(columnIndex, Long.valueOf(x));
/*      */   }
/*      */   
/*      */   public void updateFloat(int columnIndex, float x) throws SQLException {
/* 1704 */     updateObjectInner(columnIndex, Float.valueOf(x));
/*      */   }
/*      */   
/*      */   public void updateDouble(int columnIndex, double x) throws SQLException {
/* 1708 */     updateObjectInner(columnIndex, Double.valueOf(x));
/*      */   }
/*      */   
/*      */   public void updateBigDecimal(int columnIndex, BigDecimal x) throws SQLException
/*      */   {
/* 1713 */     updateObjectInner(columnIndex, x);
/*      */   }
/*      */   
/*      */   public void updateString(int columnIndex, String x) throws SQLException {
/* 1717 */     updateObjectInner(columnIndex, x);
/*      */   }
/*      */   
/*      */   public void updateBytes(int columnIndex, byte[] x) throws SQLException {
/* 1721 */     updateObjectInner(columnIndex, x);
/*      */   }
/*      */   
/*      */   public void updateDate(int columnIndex, Date x) throws SQLException {
/* 1725 */     updateObjectInner(columnIndex, x);
/*      */   }
/*      */   
/*      */   public void updateTime(int columnIndex, Time x) throws SQLException {
/* 1729 */     updateObjectInner(columnIndex, x);
/*      */   }
/*      */   
/*      */   public void updateTimestamp(int columnIndex, Timestamp x) throws SQLException
/*      */   {
/* 1734 */     updateObjectInner(columnIndex, x);
/*      */   }
/*      */   
/*      */   public void updateAsciiStream(int columnIndex, InputStream x, int length) throws SQLException
/*      */   {
/* 1739 */     updateObjectInner(columnIndex, x);
/*      */   }
/*      */   
/*      */   public void updateBinaryStream(int columnIndex, InputStream x, int length) throws SQLException
/*      */   {
/* 1744 */     updateObjectInner(columnIndex, x);
/*      */   }
/*      */   
/*      */   public void updateCharacterStream(int columnIndex, Reader x, int length) throws SQLException
/*      */   {
/* 1749 */     updateObjectInner(columnIndex, x);
/*      */   }
/*      */   
/*      */   public void updateObject(int columnIndex, Object x, int scale) throws SQLException
/*      */   {
/* 1754 */     updateObjectInner(columnIndex, x);
/*      */   }
/*      */   
/*      */   public void updateObject(int columnIndex, Object x) throws SQLException {
/* 1758 */     updateObjectInner(columnIndex, x);
/*      */   }
/*      */   
/*      */   public void updateNull(String columnName) throws SQLException {
/* 1762 */     updateNull(findColumn(columnName));
/*      */   }
/*      */   
/*      */   public void updateBoolean(String columnName, boolean x) throws SQLException {
/* 1766 */     updateBoolean(findColumn(columnName), x);
/*      */   }
/*      */   
/*      */   public void updateByte(String columnName, byte x) throws SQLException {
/* 1770 */     updateByte(findColumn(columnName), x);
/*      */   }
/*      */   
/*      */   public void updateShort(String columnName, short x) throws SQLException {
/* 1774 */     updateShort(findColumn(columnName), x);
/*      */   }
/*      */   
/*      */   public void updateInt(String columnName, int x) throws SQLException {
/* 1778 */     updateInt(findColumn(columnName), x);
/*      */   }
/*      */   
/*      */   public void updateLong(String columnName, long x) throws SQLException {
/* 1782 */     updateLong(findColumn(columnName), x);
/*      */   }
/*      */   
/*      */   public void updateFloat(String columnName, float x) throws SQLException {
/* 1786 */     updateFloat(findColumn(columnName), x);
/*      */   }
/*      */   
/*      */   public void updateDouble(String columnName, double x) throws SQLException {
/* 1790 */     updateDouble(findColumn(columnName), x);
/*      */   }
/*      */   
/*      */   public void updateBigDecimal(String columnName, BigDecimal x) throws SQLException
/*      */   {
/* 1795 */     updateBigDecimal(findColumn(columnName), x);
/*      */   }
/*      */   
/*      */   public void updateString(String columnName, String x) throws SQLException {
/* 1799 */     updateString(findColumn(columnName), x);
/*      */   }
/*      */   
/*      */   public void updateBytes(String columnName, byte[] x) throws SQLException {
/* 1803 */     updateBytes(findColumn(columnName), x);
/*      */   }
/*      */   
/*      */   public void updateDate(String columnName, Date x) throws SQLException {
/* 1807 */     updateDate(findColumn(columnName), x);
/*      */   }
/*      */   
/*      */   public void updateTime(String columnName, Time x) throws SQLException {
/* 1811 */     updateTime(findColumn(columnName), x);
/*      */   }
/*      */   
/*      */   public void updateTimestamp(String columnName, Timestamp x) throws SQLException
/*      */   {
/* 1816 */     updateTimestamp(findColumn(columnName), x);
/*      */   }
/*      */   
/*      */   public void updateAsciiStream(String columnName, InputStream x, int length) throws SQLException
/*      */   {
/* 1821 */     updateAsciiStream(findColumn(columnName), x, length);
/*      */   }
/*      */   
/*      */   public void updateBinaryStream(String columnName, InputStream x, int length) throws SQLException
/*      */   {
/* 1826 */     updateBinaryStream(findColumn(columnName), x, length);
/*      */   }
/*      */   
/*      */   public void updateCharacterStream(String columnName, Reader reader, int length) throws SQLException
/*      */   {
/* 1831 */     updateCharacterStream(findColumn(columnName), reader, length);
/*      */   }
/*      */   
/*      */   public void updateObject(String columnName, Object x, int scale) throws SQLException
/*      */   {
/* 1836 */     updateObject(columnName, x);
/*      */   }
/*      */   
/*      */   public void updateObject(String columnName, Object x) throws SQLException {
/* 1840 */     updateObjectInner(findColumn(columnName), x);
/*      */   }
/*      */   
/*      */   public Object getObject(int i, Map<String, Class<?>> map) throws SQLException
/*      */   {
/* 1845 */     return getObjectInner(i, map);
/*      */   }
/*      */   
/*      */   public Ref getRef(int i) throws SQLException {
/* 1849 */     throw new UnsupportedOperationException();
/*      */   }
/*      */   
/*      */   public Blob getBlob(int i) throws SQLException {
/* 1853 */     Object obj = getObjectInner(i);
/* 1854 */     if (obj == null) {
/* 1855 */       return null;
/*      */     }
/* 1857 */     if ((obj instanceof DmdbSerialBlob)) {
/* 1858 */       return (Blob)obj;
/*      */     }
/* 1860 */     throw new SQLException(Const.res.getString("error.dataConvertionError"));
/*      */   }
/*      */   
/*      */   public Clob getClob(int i) throws SQLException {
/* 1864 */     Object obj = getObjectInner(i);
/* 1865 */     if (obj == null) {
/* 1866 */       return null;
/*      */     }
/* 1868 */     if ((obj instanceof DmdbSerialClob)) {
/* 1869 */       return (Clob)obj;
/*      */     }
/* 1871 */     throw new SQLException(Const.res.getString("error.dataConvertionError"));
/*      */   }
/*      */   
/*      */   public Array getArray(int i) throws SQLException {
/* 1875 */     throw new UnsupportedOperationException();
/*      */   }
/*      */   
/*      */   public Object getObject(String colName, Map<String, Class<?>> map) throws SQLException
/*      */   {
/* 1880 */     return getObjectInner(findColumn(colName), map);
/*      */   }
/*      */   
/*      */   public Ref getRef(String colName) throws SQLException {
/* 1884 */     throw new UnsupportedOperationException();
/*      */   }
/*      */   
/*      */   public Blob getBlob(String colName) throws SQLException {
/* 1888 */     return getBlob(findColumn(colName));
/*      */   }
/*      */   
/*      */   public Clob getClob(String colName) throws SQLException {
/* 1892 */     return getClob(findColumn(colName));
/*      */   }
/*      */   
/*      */   public Array getArray(String colName) throws SQLException {
/* 1896 */     throw new UnsupportedOperationException();
/*      */   }
/*      */   
/*      */   public Date getDate(int columnIndex, Calendar cal) throws SQLException {
/* 1900 */     Date date = getDate(columnIndex);
/*      */     
/* 1902 */     if (cal == null) {
/* 1903 */       cal = Calendar.getInstance();
/*      */     }
/* 1905 */     cal.clear();
/* 1906 */     cal.setTimeInMillis(date.getTime());
/*      */     
/* 1908 */     return new Date(cal.getTimeInMillis());
/*      */   }
/*      */   
/*      */   public Date getDate(String columnName, Calendar cal) throws SQLException {
/* 1912 */     return getDate(findColumn(columnName), cal);
/*      */   }
/*      */   
/*      */   public Time getTime(int columnIndex, Calendar cal) throws SQLException {
/* 1916 */     Time time = getTime(columnIndex);
/*      */     
/* 1918 */     if (cal == null) {
/* 1919 */       cal = Calendar.getInstance();
/*      */     }
/* 1921 */     cal.clear();
/* 1922 */     cal.setTimeInMillis(time.getTime());
/* 1923 */     return new Time(cal.getTimeInMillis());
/*      */   }
/*      */   
/*      */   public Time getTime(String columnName, Calendar cal) throws SQLException {
/* 1927 */     return getTime(findColumn(columnName), cal);
/*      */   }
/*      */   
/*      */   public Timestamp getTimestamp(int columnIndex, Calendar cal) throws SQLException
/*      */   {
/* 1932 */     Timestamp timestamp = getTimestamp(columnIndex);
/*      */     
/* 1934 */     if (cal == null) {
/* 1935 */       cal = Calendar.getInstance();
/*      */     }
/* 1937 */     cal.clear();
/* 1938 */     cal.setTimeInMillis(timestamp.getTime());
/* 1939 */     return new Timestamp(cal.getTimeInMillis());
/*      */   }
/*      */   
/*      */   public Timestamp getTimestamp(String columnName, Calendar cal) throws SQLException
/*      */   {
/* 1944 */     return getTimestamp(findColumn(columnName), cal);
/*      */   }
/*      */   
/*      */   public URL getURL(int columnIndex) throws SQLException {
/* 1948 */     throw new UnsupportedOperationException();
/*      */   }
/*      */   
/*      */   public URL getURL(String columnName) throws SQLException {
/* 1952 */     throw new UnsupportedOperationException();
/*      */   }
/*      */   
/*      */   public void updateRef(int columnIndex, Ref x) throws SQLException {
/* 1956 */     throw new UnsupportedOperationException();
/*      */   }
/*      */   
/*      */   public void updateRef(String columnName, Ref x) throws SQLException {
/* 1960 */     throw new UnsupportedOperationException();
/*      */   }
/*      */   
/*      */   public void updateBlob(int columnIndex, Blob x) throws SQLException {
/* 1964 */     updateObjectInner(columnIndex, x);
/*      */   }
/*      */   
/*      */   public void updateBlob(String columnName, Blob x) throws SQLException {
/* 1968 */     updateBlob(findColumn(columnName), x);
/*      */   }
/*      */   
/*      */   public void updateClob(int columnIndex, Clob x) throws SQLException {
/* 1972 */     updateObjectInner(columnIndex, x);
/*      */   }
/*      */   
/*      */   public void updateClob(String columnName, Clob x) throws SQLException {
/* 1976 */     updateClob(findColumn(columnName), x);
/*      */   }
/*      */   
/*      */   public void updateArray(int columnIndex, Array x) throws SQLException {
/* 1980 */     throw new UnsupportedOperationException();
/*      */   }
/*      */   
/*      */   public void updateArray(String columnName, Array x) throws SQLException {
/* 1984 */     throw new UnsupportedOperationException();
/*      */   }
/*      */   
/*      */   public void commit() throws SQLException {
/* 1988 */     getConnectionInner().commit();
/*      */   }
/*      */   
/*      */   public void rollback() throws SQLException {
/* 1992 */     getConnectionInner().rollback();
/*      */   }
/*      */   
/*      */   public void rollback(Savepoint s) throws SQLException {
/* 1996 */     getConnectionInner().rollback(s);
/*      */   }
/*      */   
/*      */   abstract DmdbConnection_bs getConnectionInner()
/*      */     throws SQLException;
/*      */ }


/* Location:              D:\Program Files\DBMS_20150813\jdbc\Dm7JdbcDriver17.jar!\dm\jdbc\rowset\DmdbCachedRowSet_bs.class
 * Java compiler version: 5 (49.0)
 * JD-Core Version:       0.7.1
 */